package org.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@EnableScheduling//开启定时任务
@EnableDiscoveryClient
@SpringBootApplication
public class PayServer {
    public static void main(String[] args) {
        SpringApplication.run(PayServer.class);
    }

    //一共有7个参数
    //我们只填6个参数   秒 分 时 天 月 周 年(选择填)
    @Scheduled(cron = "* 0/15 * * * ?")//每5秒执行一次
    public void code(){
        System.out.println(55555555);
    }
}